<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="CategoriaCreateDlg" widgetVar="CategoriaCreateDialog" modal="true" resizable="false" appendTo="@(body)" header="#{bundle.CreateCategoriaTitle}">
            <h:form id="CategoriaCreateForm">
                <h:panelGroup id="display">
                    <p:panelGrid columns="2" rendered="#{categoriaController.selected != null}">
                        <p:outputLabel value="#{bundle.CreateCategoriaLabel_idcategoria}" for="idcategoria" />
                        <p:inputText id="idcategoria" value="#{categoriaController.selected.idcategoria}" title="#{bundle.CreateCategoriaTitle_idcategoria}" required="true" requiredMessage="#{bundle.CreateCategoriaRequiredMessage_nmbcategoria}"/>
                        <p:outputLabel value="#{bundle.CreateCategoriaLabel_nmbcategoria}" for="nmbcategoria" />
                        <p:inputText id="nmbcategoria" value="#{categoriaController.selected.nmbcategoria}" title="#{bundle.CreateCategoriaTitle_nmbcategoria}" required="true" requiredMessage="#{bundle.CreateCategoriaRequiredMessage_nmbcategoria}"/>
                        <p:outputLabel value="#{bundle.CreateCategoriaLabel_dsccategoria}" for="dsccategoria" />
                        <p:inputText id="dsccategoria" value="#{categoriaController.selected.dsccategoria}" title="#{bundle.CreateCategoriaTitle_dsccategoria}" required="true" requiredMessage="#{bundle.CreateCategoriaRequiredMessage_dsccategoria}"/>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{categoriaController.create}" value="#{bundle.Save}" update="display,:CategoriaListForm:datalist,:growl" oncomplete="handleSubmit(args,'CategoriaCreateDialog');"/>
                    <p:commandButton value="#{bundle.Cancel}" onclick="CategoriaCreateDialog.hide()"/>
                </h:panelGroup>
            </h:form>
        </p:dialog>

    </ui:composition>
</html>
